﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using lgweb.common;
using LGCourt.Logic.BLL;
using KMFrame.Core;
using LGCourt.Logic.NBL.DBEntities;

namespace lgweb.inside.information
{
    public partial class index : NeedValidatePage
    {
        private int _pageIndex = 1;
        protected new void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);
            if (!this.IsPostBack)
            {               
                GetList();
            }
        }      

        private void GetList()
        {
            BBS bbsBLL = new BBS();
            InfoCondition infoParam = new InfoCondition();
            infoParam.PageSize = 6;
            infoParam.InfoTag = "简报";
            IEnumerable<vPortalArticleTitleEx> jbList = bbsBLL.GetNewsInfoTop(infoParam);
            if (jbList != null)
            {
                this.rptjbList.DataSource = jbList;
                this.rptjbList.DataBind();
            }

            infoParam.InfoTag = "排头兵";
            IEnumerable<vPortalArticleTitleEx> slList = bbsBLL.GetNewsInfoTop(infoParam);
            if (slList != null)
            {
                this.rptptbList.DataSource = slList;
                this.rptptbList.DataBind();
            }

            infoParam.InfoTag = "党建";
            IEnumerable<vPortalArticleTitleEx> djList = bbsBLL.GetNewsInfoTop(infoParam);
            if (djList != null)
            {
                this.rptdjList.DataSource = djList;
                this.rptdjList.DataBind();
            }

            infoParam.InfoTag = "信息报送";
            IEnumerable<vPortalArticleTitleEx> xxList = bbsBLL.GetNewsInfoTop(infoParam);
            if (xxList != null)
            {
                this.rptxxList.DataSource = xxList;
                this.rptxxList.DataBind();
            }

            infoParam.InfoTag = "廉政";
            IEnumerable<vPortalArticleTitleEx> lzList = bbsBLL.GetNewsInfoTop(infoParam);
            if (lzList != null)
            {
                this.rptlzList.DataSource = lzList;
                this.rptlzList.DataBind();
            }
        }
    }
}